import request from '@/utils/request'

export function getGarageList(playload) {
  return request({
    url: '/get',
    method: 'get',
    params: {
      module: 'CarService.carList',
      ...playload
    }
  })
}

export function editGarageList(playload) {
  let module_name = 'CarService.addCar'
  if (playload.id && playload.id !== '') {
    module_name = 'CarService.updateCar'
  }
  const data = {
    module: module_name,
    ...playload
  }

  return request({
    url: '/post',
    method: 'post',
    data
  })
}
